<%@ page language="java" import="java.util.*,com.beans.*,com.dao.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		
		<title>My JSP 'index.jsp' starting page</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		
		<meta http-equiv="description" content="This is my page">
		<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
		<script type="text/javascript" src="js/jquery.easing.js"></script>
		<script type="text/javascript" src="js/jquery.accordion.js"></script>
		<script type="text/javascript">
			$(function() {
				$('#navigation').accordion({
					active:1,
					header:'.head',
					/*navigation1: false,  */
					event:'click',
					fillSpace:true,
					animated:'bounceslide' /*slide,bounceslide ,bounceslide,easeslide'*/
				});
			});
		</script>
		
		<link rel="stylesheet" type="text/css" href="css/menu.css">
	</head>
	
	<body>
	<%
		MenuDao menDao = new MenuDao();
		AdminInfo adminInfo = (AdminInfo) session.getAttribute("admin_session");
		List<MenuInfo> menuList = menDao.getMenuList(0,adminInfo.getRoleId());
		request.setAttribute("menuList", menuList);
	%>
	<ul id="navigation">
		<c:forEach var="menu" items="${menuList }">
					<li><a class="head">${menu.menuName }</a>
						<ul>
							<li>
								<c:forEach var="msub" items="${menu.subMenuList }">
											<a href="${msub.url }" target="${msub.target }">
											<img src="images/${msub.icon }" />
											<label>${msub.menuName }</label>
											</a>
									</c:forEach>
							</li>
						</ul>
					</li>
			
		</c:forEach>
	</ul>
	
	
	</body>
</html>